From: Giovanni Campagna Date: Wed, 24 Apr 2013 17:32:41 +0000 (+0200) Subject: ShellDBus: add ShowApplications method X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3557 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9c814d1584c27b2f9efe7a167023e875e35b4f92;p=gnome-shell.git ShellDBus: add ShowApplications method Add a method to control the visibility of the applications view. This can used by gnome-settings-daemon for special keys in certain keyboards. https://bugzilla.gnome.org/show_bug.cgi?id=698743 --- diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index 802640b0d..c56692f8f 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -28,6 +28,7 @@ const GnomeShellIface = + @@ -140,11 +141,12 @@ const GnomeShell = new Lang.Class({ }, FocusApp: function(id) { - let overview = Main.overview; + this.ShowApplications(); + Main.overview.viewSelector.appDisplay.selectApp(id); + }, - overview.show(); - overview.viewSelector.setActivePage(ViewSelector.ViewPage.APPS); - overview.viewSelector.appDisplay.selectApp(id); + ShowApplications: function() { + Main.overview.viewSelector.showApps(); }, GrabAcceleratorAsync: function(params, invocation) { diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index 414dd33bd..a78a9f72f 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -165,6 +165,11 @@ const ViewSelector = new Lang.Class({ this._showAppsButton.checked = !this._showAppsButton.checked; }, + showApps: function() { + Main.overview.show(); + this._showAppsButton.checked = true; + }, + show: function() { this._activePage = this._workspacesPage;